#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=60;
typedef long long LL;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL a[maxn][maxn];
int main(void){
   	cin.tie(0);std::ios::sync_with_stdio(false);
    LL h,w;cin>>h>>w;
    for(LL i=1;i<=h;i++){
        for(LL j=1;j<=w;j++) cin>>a[i][j];
    }
    bool flag=true;
    for(int i=1;i<=h;i++){
        for(int j=1;j<=w;j++){
            for(int k=i+1;k<=h;k++){
                for(int p=j+1;p<=w;p++){
                    if( !( a[i][j]+a[k][p]<=a[k][j]+a[i][p])){
                        flag=false;
                    }
                }
            }
        }
    }
    if(flag){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
   	return 0;
}
